#ifndef LEDWINDOW_H
#define LEDWINDOW_H

#include <QMainWindow>
#include <QIcon>
#include <QGraphicsColorizeEffect>
#include <QMovie>

#define TEST_MAGIC 'x'                    //定义幻数
#define LED1 _IO(TEST_MAGIC, 0)
#define LED2 _IO(TEST_MAGIC, 1)
#define LED3 _IO(TEST_MAGIC, 2)
#define LED4 _IO(TEST_MAGIC, 3)
#define LED_ON  	0	//灯亮
#define LED_OFF		1   //灯灭


namespace Ui {
class LedWindow;
}

class LedWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit LedWindow(QWidget *parent = nullptr);
    ~LedWindow();

    //连接主功能界面和灯界面的槽函数--用于语音开灯/关灯
    void led_win(int num);

private slots:
    void on_led1_btn_clicked();

    void on_led2_btn_clicked();

    void on_led3_btn_clicked();

    void on_led4_btn_clicked();

    void on_return_btn_clicked();

private:
    Ui::LedWindow *ui;
    int fd;
    //灯开关的状态
    int flag1 = 0;
    int flag2 = 0;
    int flag3 = 0;
    int flag4 = 0;
};

#endif // LEDWINDOW_H
